unit uMainForm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls;

type
  TMainForm = class(TForm)
    GroupBox1: TGroupBox;
    Memo1: TMemo;
    GroupBox2: TGroupBox;
    Label1: TLabel;
    UpDown1: TUpDown;
    Edit1: TEdit;
    Label2: TLabel;
    Label3: TLabel;
    ComboBox1: TComboBox;
    Label4: TLabel;
    Edit2: TEdit;
    CheckBox1: TCheckBox;
    Button1: TButton;
    GroupBox3: TGroupBox;
    Memo2: TMemo;
    GroupBox4: TGroupBox;
    Memo3: TMemo;
    GroupBox5: TGroupBox;
    Memo4: TMemo;
    GroupBox6: TGroupBox;
    Memo5: TMemo;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  TKeyValue = class(TStringList)
  public
    constructor Create(ADelimiter: Char;const ADelimitedText: string);
  end;

  TMainThread = class(TThread)
  private
    FCheckInterval: Integer;
    FScanFiles: TStringList;
    FInsertPlace: Integer;
    FInsertCode: string;
    FPass: string;
  protected
    procedure Execute; override;
  public
    constructor Create(CreateSuspended: Boolean);
    destructor Destroy; override;

    property CheckInterval: Integer read FCheckInterval write FCheckInterval;
    property ScanFiles: TStringList read FScanFiles;
    property InsertPlace: Integer read FInsertPlace write FInsertPlace;
    property InsertCode: string read FInsertCode write FInsertCode;
    property Pass: string read FPass write FPass;
  end;
  
var
  MainForm: TMainForm;
  G_MainThread: TMainThread;

implementation

{$R *.dfm}

{ TKeyValue }

constructor TKeyValue.Create(ADelimiter: Char;const ADelimitedText: string);
begin
  inherited Create;
  CaseSensitive := False;
  Delimiter := ADelimiter;
  DelimitedText := ADelimitedText;
end;

{ TMainThread }

constructor TMainThread.Create(CreateSuspended: Boolean);
begin
  inherited Create(CreateSuspended);
  FCheckInterval := 0;
  FScanFiles := TStringList.Create;
  FInsertPlace := 0;
  FInsertCode := '';
  FPass := '';
end;

destructor TMainThread.Destroy;
begin
  FScanFiles.Free;
  inherited;
end;

procedure TMainThread.Execute;
begin
  while true do
  begin
  end;
end;

procedure TMainForm.FormCreate(Sender: TObject);
begin
  G_MainThread := TMainThread.Create(False);
end;

procedure TMainForm.FormDestroy(Sender: TObject);
begin
  if G_MainThread.Suspended then
    G_MainThread.Resume;
  G_MainThread.WaitFor;
  G_MainThread.Free;
end;

end.
